using System;

[Serializable]
public class QuestData
{
    public QuestDataSO questDataSO { get; private set; }
    public RewardType rewardType { get; private set; }
    public int requireAmount = 0;
    public bool isFinishQuest;
    public QuestData(QuestDataSO questDataSO)
    {
        this.questDataSO = questDataSO;
        rewardType = questDataSO.rewardType;
    }

    public void AddRequireAmount(int amount = 1)
    {
        requireAmount += amount;
        isFinishQuest = CanGetReward();
    }

    public bool CanGetReward() => requireAmount >= questDataSO.requireAmount;
}
